/*
 * HtmlWrapper.h
 *
 *  Created on: 18.01.2013
 *      Author: sebastian
 */

#ifndef HTMLWRAPPER_H_
#define HTMLWRAPPER_H_
#include <string>
#include "Game.h"


typedef std::string Body;
typedef std::string Header;

///= Header + Body
typedef std::string Response;



/**
 * this class is simply handling HTTP-requests.
 */
class HtmlWrapper {
private:
	static Body getLoginPage();

	///logging player in and setting cookies in header.
	static Response login(const std::string &request, const std::string &clientIP);

	///getting current servertime
	static Body getTime();

	//Hint: for the following actions the Player needs to be logged in and identified.
	///getting Players Homepage.
	static Body getHomePage(const Player *player);


	///getting last version of jQuery
	static Body getJQuery();

	static Body getThreeJS();

	static Body getMap();

	static Body getPlanets(const Player *player);

	static Body getSpaceships(const Player *player);

	static Body getSettings(const Player *player);

	static Body getUniverse();

public:
	/*HtmlWrapper(); //nobody need's em
	virtual ~HtmlWrapper();*/


	static std::string processRequest(const std::string &request, const std::string &clientIP);

};

#endif /* HTMLWRAPPER_H_ */
